<?php


function get_output_path($filetype = 'control', $cs_name, $structure, $project){
	$structure_path = QC_SYS_BASEDIR . '/structures/';
	
	include $structure_path . $structure .'/paths.php';
	

	$outpath = $paths[$filetype];
	

	$outpath = str_replace('<setname>',$cs_name,$outpath);
	
	$outpath = QC_SYS_BASEDIR . '/' . QC_PROJECT_SUBPATH . $project . '/' . $outpath ;

	makesuredir($outpath);
	
	return $outpath;
	
}

function makesuredir($dir){
	if(!file_exists(dirname($dir))){
		makesuredir(dirname($dir));
	}
	if(!file_exists($dir)){
		mkdir($dir);
	}
}







?>